what is lamp? lamp is linux+apache+mysql+php.They are all open source software and free.
- change your centos 7 yum source to a faster source and upgrade the os.
for example:
1 backup local yum source.mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2 get a faster soucewget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
then update cache and osyum makecache
yum -y update - install apache
yum install httpd
apache point the default root dir to /var/www/html
configuration file is in dir /etc/httpd/conf/httpd.conf - install mysql
if you want use utf8mb4.the mysql version need higher then 5.5.3
some emoji code need utf8mb4 format.
centos replacing mysql with mariadb.
if you want use mysql.
1 download mysql yum repositorywget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2 add mysql yum repository to system repository listyum localinstall mysql-community-release-el7-5.noarch.rpm
you can check if it runs successed.yum repolist enabled | grep "mysql.*-community.*"
3 install mysqlyum install mysql-community-server
run mysqlsystemctl start mysqld
orservice mysqld start
modify mysql root passwordmysqladmin -u root password "xxxxxxxx"
now mysql install successful.you can try login in it. - install php
wordpress 5.2 need php 7.2 or higher.But centos 7 only has 5.4 version.
so we need add another yum repository such like mysql.rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
then we can install php 7.2 now.yum install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
- finally we finished installation.
we can start httpd service and edit a index file to test.vi /var/www/html/index.php
with content<?php
echo phpinfo();
?>
open your browser and open the address http://yourip/
we can see the page like following:
if you can’t open the page.maybe it denied by firewall.
runfirewall-cmd --zone=public --add-port=80/tcp --permanent
if you want access mysql from other computer.also needfirewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=3306/udp --permanent
thenfirewall-cmd --reload
15 Comments
keto pudding
July 8, 2021 at 12:26 amketo coleslaw recipe
keto friendly pasta
July 7, 2021 at 9:28 amketo teriyaki sauce
keto diet josh axe
July 7, 2021 at 5:30 amketo chocolate cheesecake
plenty of fish dating site free search
June 26, 2021 at 12:29 pmfree malta dating sites
free dating sites best
June 24, 2021 at 5:58 amfree dating ideas for couples
free shemale dating sites
June 2, 2021 at 10:12 amfree no credit card dating
interracial dating site free
June 2, 2021 at 8:07 am100% free dating sites no fees
free dating sites for gamers
June 1, 2021 at 10:31 pmlist of free dating website
free to message and use dating site
June 1, 2021 at 5:54 pmrussian girls dating for free
top 10 free russian dating sites
May 27, 2021 at 1:21 amswingers dating free
senior dating sites 100% free
May 21, 2021 at 1:48 ambest free online dating service
free speed dating sites
May 21, 2021 at 12:00 amfree dating hotlines to call
best online dating websites free
May 20, 2021 at 6:05 pm100 free singles online dating
sex dating and relationships websites free
May 19, 2021 at 10:02 pmfree international dating site
tinder cheat
May 16, 2021 at 3:06 pmtinder cheat
build website platform. LAMP – rock funs