• news
  • pics
  • linux
  • windows
  • proxmox
  • game
  • news
  • pics
  • linux
  • windows
  • proxmox
  • game
Home
linux

build website platform. LAMP

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 souce
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    then update cache and os
    yum 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 repository
    wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
    2 add mysql yum repository to system repository list
    yum localinstall mysql-community-release-el7-5.noarch.rpm
    you can check if it runs successed.
    yum repolist enabled | grep "mysql.*-community.*"


    3 install mysql
    yum install mysql-community-server
    run mysql
    systemctl start mysqld or service mysqld start
    modify mysql root password
    mysqladmin -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.
run
firewall-cmd --zone=public --add-port=80/tcp --permanent
if you want access mysql from other computer.also need
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=3306/udp --permanent
then
firewall-cmd --reload

Previous article vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
Next article how to use crontab to excute tasks on time

therock

15 Comments

  1. keto pudding
    July 8, 2021 at 12:26 am

    keto coleslaw recipe

  2. keto friendly pasta
    July 7, 2021 at 9:28 am

    keto teriyaki sauce

  3. keto diet josh axe
    July 7, 2021 at 5:30 am

    keto chocolate cheesecake

  4. plenty of fish dating site free search
    June 26, 2021 at 12:29 pm

    free malta dating sites

  5. free dating sites best
    June 24, 2021 at 5:58 am

    free dating ideas for couples

  6. free shemale dating sites
    June 2, 2021 at 10:12 am

    free no credit card dating

  7. interracial dating site free
    June 2, 2021 at 8:07 am

    100% free dating sites no fees

  8. free dating sites for gamers
    June 1, 2021 at 10:31 pm

    list of free dating website

  9. free to message and use dating site
    June 1, 2021 at 5:54 pm

    russian girls dating for free

  10. top 10 free russian dating sites
    May 27, 2021 at 1:21 am

    swingers dating free

  11. senior dating sites 100% free
    May 21, 2021 at 1:48 am

    best free online dating service

  12. free speed dating sites
    May 21, 2021 at 12:00 am

    free dating hotlines to call

  13. best online dating websites free
    May 20, 2021 at 6:05 pm

    100 free singles online dating

  14. sex dating and relationships websites free
    May 19, 2021 at 10:02 pm

    free international dating site

  15. tinder cheat
    May 16, 2021 at 3:06 pm

    tinder cheat

    build website platform. LAMP – rock funs

Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Categories
  • game
  • linux
  • news
  • pics
  • proxmox
  • windows
Recent Posts
  • proxmox7.3直通显卡
  • Proxmox VE 直通显卡方案及解决N卡Code43
  • Linux系统出现:You have new mail in /var/spool/mail/root 的原因及解决办法
  • debian系统解决中文乱码
  • pve添加git和pvetools
Recent Comments
  • EdgarTot on proxmox7.3直通显卡
  • Ashvem on proxmox7.3直通显卡
  • Tedvem on proxmox7.3直通显卡
  • Jackvem on proxmox7.3直通显卡
  • Miavem on proxmox7.3直通显卡
Archives
  • March 2023 (1)
  • December 2022 (4)
  • November 2022 (6)
  • April 2022 (1)
  • February 2022 (5)
  • January 2022 (2)
  • December 2021 (3)
  • November 2021 (1)
  • October 2021 (2)
  • September 2021 (1)
  • August 2021 (1)
  • July 2021 (8)
  • June 2021 (14)
  • May 2021 (2)
  • April 2021 (2)
  • March 2021 (10)
  • January 2021 (4)
  • December 2020 (4)
  • November 2020 (13)
  • April 2020 (276)
  • March 2020 (1)
  • June 2019 (5)
  • May 2019 (10)
  • December 2015 (1)