標籤

ASP.NET MVC (29) Visual C# (15) JQuery (10) Plugins (8) JQuery Plugins (6) JavaScript (6) MySQL (5) CSS (4) LinQ (4) Mac OS (4) CentOS (3) Design Pattern (3) Entity Framework (3) IIS (3) Python (3) Windows (3) php (3) Docker (2) LAMP (2) SQL Server (2) WCF (2) .NET (1) .NET Core (1) AWS (1) Browser (1) GIS (1) IE (1) Internet Security (1) Linux (1) Platform (1) React (1) SEO (1) Testing (1) VMware (1) Windows 7 (1) cookie (1) curl (1) laravel (1) phpBB (1) session (1) 中古屋 (1) 透天 (1) 閒言閒語 (1) 面試 (1) 鳥松 (1)

2016年6月15日 星期三

CentOS 6.7 LAMP 安裝過程

最近拿了手邊空的機器複習一下如何安裝LAMP在CentOS6.7上, 安裝紀錄過程有點簡陋請見諒.



1. LAMP

[安裝Apache]
[root@localhost ~]# sudo yum install httpd

[root@localhost ~]# sudo service httpd start

觀看防火牆狀態
[root@localhost ~]# /etc/init.d/iptables status

加入80 port規則
[root@localhost ~]# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

重啟防火牆
[root@localhost ~]# /etc/init.d/iptables restart


[安裝MySQL]
[root@localhost ~]# sudo yum install mysql-server

[root@localhost ~]# sudo service mysqld start

設定root密碼
[root@localhost ~]# /usr/bin/mysql_secure_installation
- Set root password? [Y/n]
- Remove anonymous users? [Y/n]
- Remove test database and access to it? [Y/n]
- Reload privilege tables now? [Y/n]


[安裝PHP]
[root@localhost ~]# sudo yum install php php-mysql


[安裝Webmin]
[root@localhost ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.801-1.noarch.rpm
[root@localhost ~]# yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty
[root@localhost ~]# rpm -U webmin-1.801-1.noarch.rpm

加入 10000 port 規則
[root@localhost ~]# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT






[Reference]
https://www.atlantic.net/community/howto/install-lamp-centos-6/
http://os.51cto.com/art/201103/249398.htm
http://www.webmin.com/rpm.html



沒有留言:

張貼留言