Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build plug-ins such as GD Library in centos7 PHP Environment

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to build plug-ins such as GD libraries in centos7 PHP environment. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Install Apache

1. Installation

Yum-y install httpd

two。 Enable the apache service

Systemctl start httpd.service

3. Set the apache service to boot

Systemctl enable httpd.service

4. Verify that the apache service is installed successfully

After checking the information, it is said that CentOS7 used iptables firewall before Firewall-cmd,CentOS7. If you want the public network to access the apache home directory, you need to do the following:

Firewall-cmd-permanent-zone=public-add-service=httpfirewall-cmd-permanent-zone=public-add-service=httpsfirewall-cmd-reload

Then visit the public network ip, if you see the default page of apache-there is Testing 123. The apache service has been successfully installed

Install PHP

1. Installation

Yum-y install php

two。 Restart the apache service

Systemctl restart httpd or systemctl restart httpd.service

Then, you can write a php file and run it in your browser.

Eg:

Vi / var/www/html/info.phpiEsc:wq

Then, type 192.168.1.1/info.php in your computer browser

When running, some information about php will appear.

Install MySQL

I also installed MariaDB here according to the tutorial I learned.

1. Installation

Yum-y install mariadb*

two。 Enable the MySQL service

Systemctl start mariadb.service

3. Set the boot to start the MySQL service

Systemctl enable mariadb.service

4. Set the password for the root account

Mysql_secure_installation

Then there will be a string of things that you can read carefully. If you are too lazy to read, just press Enter when prompted, and when you set the password, you can enter the password you want, and then continue to let you choose yes, Enter. When it's over, you can type mysql-uroot-p to verify it.

Associate PHP with MySQL

Yum search php, choose the installation you need: yum-y install php-mysql

Install commonly used PHP modules

For example, GD library, curl,mbstring,...

1. Installation:

Yum-y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

two。 Restart the apache service

Systemctl restart httpd.service, thank you for your reading! This is the end of this article on "how to build plug-ins such as GD library in centos7 PHP environment". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report