安裝 CentOS-7-x86_64-Minimal-1511.iso
yum update -y
##cron
yum install -y mlocate wget zip unzip ntpdate firewalld vim
yum install -y vim-X11 vim-common vim-enhanced vim-minimal
調校設定
vim /etc/vimrc
添加以下內容(比對一下內容,有些已存在配置檔內)
set number " 顯示列號 nu / nonu
set hlsearch " 高亮度反白標記搜尋到的字串 hlsearch / nohlsearch
set backspace=2 " 編輯模式下可用倒退鍵刪除, 0 或 1 :僅可刪除剛輸入的字元, 無法刪除原本就已經存在的文字,2:任意刪除
set autoindent | " 自動縮排 autoindent / noautoindent | |
set showmode | " 顯示左下方的 --INSERT-- 之類的狀態說明列 | |
set bg=dark | " 顯示不同的底色色調 light / dark | |
syntax on | " 進行語法檢驗,顏色顯示。 | |
highlight Comment ctermfg=cyan | " 設定註解的顏色 | |
highlight Search term=reverse ctermbg=4 ctermfg=7 | " 設定搜尋到的字串顏色 | |
set tabstop=4 | " 設定 tab 鍵的字元數 | |
set backup | " 自動儲存備份檔,更動任何一個檔案時,原始檔案會被另存成一個檔名為 | 『目前檔名~』 的檔案, |
保留原始檔案內容。
vim /etc/sysconfig/selinux
enforcing --> disabled
setenforce 0
ntpdate time.stdtime.gov.tw | hwclock -w
yum install -y httpd
systemctl start httpd.service
systemctl status httpd.service
systemctl enable httpd.service
yum install -y mariadb-server mariadb
systemctl start mariadb.service
systemctl status mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
yum install -y php php-gd php-mbstring php-mysql php-xml
systemctl restart httpd.service
php -v
systemctl start firewalld.service
systemctl status firewalld.service
systemctl enable firewalld.service
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --add-service=mysql --permanent --zone=public
firewall-cmd --reload
check Request test webpage
vim /etc/locale.conf
LANG="zh_TW.Big5“
cp /163.17.209.242/etc/locale.conf /etc/.
vim /etc/httpd/conf/httpd.conf
Options Indexes FollowSymLinks Options FollowSymLinks
AddDefaultCharset UTF-8 AddDefaultCharset big5
cp /163.17.209.242/etc/httpd/conf/httpd.conf /etc/httpd/conf/.
vim /etc/my.cnf
[mysqld]
default-storage-engine=MyISAM
###在安裝sfs前做好,sh setup.sh前做好
cp /163.17.209.242/etc/my.cnf /etc/.
vim /etc/php.ini
error_reporting = E_ALL & ~E_NOTICE
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
date.timezone = "Asia/Taipei“
short_open_tag = On
max_execution_time = 300
upload_max_filesize = 20M
post_max_size = 20M
cp /163.17.209.242/etc/php.ini /etc/.
yum install -y php-pear php-bcmath
pear -d preferred_state=beta install Crypt_DiffieHellman
pear install Crypt_CBC
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epelrelease-7-8.noarch.rpm
yum install -y php-mcrypt
Get the sfs_stable5 tarball
cd /var/www/html
wget http://sfscvs.tc.edu.tw/sfs_stable5.tar.gz
tar zxvf sfs_stable5.tar.gz
ls
sh setup.sh
http://localhost.localdomain/sfs3/install.php
chmod 644 /var/www/html/sfs3/include/config.php
rm -f /var/www/html/sfs3/install.php
cp /var/www/html/sfs3/include/config.php /var/www/html/config.php.20160811.php
沒有留言:
張貼留言