安裝後作業
安裝 EPEL (擴充套件庫)
cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -i epel-release-latest-7.noarch.rpm
更新及安裝 g++
sudo yum update -y
sudo yum upgrade -y
sudo yum install -y gcc gcc-c++
安裝並切換到 zsh
sudo yum install -y zsh git git-core
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
chsh -s /bin/zsh
zsh
設定 oh-my-zsh 、字體、以及設定檔
安裝字體
/tmp
git clone https://github.com/powerline/fonts.git
fonts
./install.sh
fc-cache -fv
設定 zshrc
/tmp
git clone https://github.com/Lorex/.zshrc.git zshrc
zshrc
mv .zshrc ~/.zshrc
source ~/.zshrc
emacs 相關 安裝及設定 emacs sudo yum install -y emacs git clone https://github.com/Lorex/.emacs.git ~/.emacs.d
以下章節除非你要寫 C++,否則可以不用設定
修正補完路徑(非必要)
查詢 gcc 相關路徑資訊、編輯檔案
gcc -xc++ -E -v -
em ~/.emacs.d/init.el
48: 'defcustom mycustom-system-include-paths '("./include/" "/usr/local/include" "/usr/include"
80: (add-to-list 'achead:include-directories '"/usr/include/c++/4.8.3")
安裝及設定 cpplint(非必要) 安裝 pip sudo yum -y install python python-pip
安裝 cpplint
sudo pip install cpplint
which cpplint #搜尋cpplint所在位置
em ~/.emacs.d/init.el
92: '(flymake-google-cpplint-command "/usr/local/bin/cpplint")
#修正路徑
細部設定
關閉 SELinux
sem /etc/selinux/config
SELINUX=disabled
sudo reboot
改 SSH Port
sem /etc/ssh/sshd_config
Port 20201
AddressFamily any
ListenAddress 0.0.0.0
ListenAddress ::
sudo firewall-cmd --zone=public --add-port=20201/tcp
sudo firewall-cmd --zone=public --add-port=20201/tcp --permanent
sudo systemctl restart sshd.service
安裝 Oracle Java 7 JDK 7u80
下載地址
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
選 Java SE Development Kit 7u79、勾選 Accept License Agreement
下載 jdk-7u79-linux-x64.rpm,取得 URL
/tmp
wget
檢查 java 版本 java -version
安裝 Oracle Java 8 Server JRE
下載地址
http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html
選 Linux x64、勾選 Accept License Agreement
下載 server-jre-8u60-linux-x64.tar.gz,取得 URL
wget
安裝 LAMP 安裝相關 rpm sudo yum install httpd mariadb-server mariadb php php-mbstring php-mysql php-gd wget unzip -y
安裝 phpMyAdmin cd /var/www/html/ sudo wget -O sql.zip https://files.phpmyadmin.net/phpMyAdmin/4.4.12/phpMyAdmin-4.4.12-all-languages.zip sudo unzip sql.zip sudo mv phpMyAdmin-4.4.12-all-languages sql sudo rm -rf sql.zip
修改 /etc/my.cnf
sem /etc/my.cnf
innodb_file_per_table = 1
重新啟動服務 sudo systemctl start mariadb.service sudo systemctl start httpd.service sudo systemctl enable mariadb.service sudo systemctl enable httpd.service
設定 mariadb 帳號密碼 mysqladmin -u root password 'your-password'
開啟 80 port sudo firewall-cmd --zone=public --add-port=80/tcp sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
開服相關
創建資料夾
sudo mkdir /mc
sudo chown
開啟 25565 port sudo firewall-cmd --zone=public --add-port=25565/tcp sudo firewall-cmd --zone=public --add-port=25565/tcp --permanent
開伺服器 java -Xmx8G -server -d64 -jar filename.jar Access denied 利用 sudo chown <使用者名稱> <資料夾> 檢查檔案權限