選中文
安裝目的地需要設定一下。
原本預設的20G虛擬硬碟已經有資料,需要將他洗掉。
刪除
網路連線,可以先給他,避免到文字介面設定網路。
預設DHCP,在右邊設定可以給他固定IP。
然後是設定root密碼,按下一步把系統裝完。
◎查詢版本
cat /etc/redhat-release
◎關機
shutdown now
◎重開機
reboot
◎手動設定網路卡
cd /etc/sysconfig/network-scripts/
vi ifcfg-網卡編號
◎更新
yum upgrade
或
yum update
◎安裝常用工具 套件庫
yum install vim wget net-tools epel-release unzip
◎安裝LAMP
暫時關閉防火牆
systemctl stop firewalld.service
systemctl disable firewalld.service
yum install httpd mariadb-server mariadb php php-mbstring php-mysql php-gd phpmyadmin
設定 MariaDB Innodb
修改 /etc/my.cnf 檔案,在 [mysqld] 下新增
innodb_file_per_table = 1
啟動服務
systemctl start mariadb.service
systemctl start httpd.service
systemctl enable mariadb.service
systemctl enable httpd.service
設定 MariaDB 資料庫的 root 密碼
mysqladmin -u root password 'your-password'
◎設定防火牆,開啟80 port
1.開啟防火牆
systemctl start firewalld.service
systemctl enable firewalld.service
2.新增一個xml名稱叫做http
vi /etc/firewalld/services/http.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>http</short>
<description></description>
<port protocol="tcp" port="80"/>
</service>
3.加入規則
vi /etc/firewalld/zones/public.xml
1.新增http例外
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>DMZ</short>
<description>(說明文字省略)</description>
<service name="ssh"/>
<service name="http"/>
</zone>
2.重開
firewall-cmd --complete-reload
◎修改SSH,預設port,限制可連線的IP
◎放置網頁
◎安裝phpmyadmin管理資料庫
◎安裝xoops
◎安裝e-mail伺服器
沒有留言:
張貼留言