search
HomeDevelopment ToolscomposerHow to install lnmp environment and composer of php7.3 in centos7.7

The following is the tutorial column of composer to introduce to you the lnmp environment and composer detailed steps for installing php7.3 in centos7.7. I hope it will be helpful to friends in need!

How to install lnmp environment and composer of php7.3 in centos7.7

1.Update source<br>  yum update<br>2.Install nginx<br>  yum install nginx<br>3. Start nginx<br>  service nginx start<br>4. Visit http://yourip

If you want to configure the domain name, see the bottom.

5. Install mysql:

Install mysql source yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7. noarch.rpm<br> Installation: yum install mysql mysql-server<br> Start: /etc/init.d/mysqld start or service mysqld restart

Reset password :mysql -u root -p <br> Chance of error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)<br> Reason: Permission problem<br> Solution: sudo chown -R root:root /var/lib/mysql (Both roots can be changed to owners, but they need to be consistent)<br> Restart service<br> service mysqld restart

Log in to mysql<br> mysql -u root -p // Press Enter to log in directly. There is no password for mysql just after installing it<br> Modify mysql password

Use mysql;<br> Modify earlier versions: update user set password =password('your password') where user='root';

High version modification: update user set authentication_string = password('your password'), password_expired = 'N', password_last_changed = now( ) where user = 'root';<br>    alter user 'root'@'localhost' identified by 'your password';<br> If the password is not strong enough, you can check the password level: SHOW VARIABLES LIKE "%password%" ;<br> Then set to low level: SET GLOBAL validate_password_policy=0;<br> Finally exit;<br> exit;<br> Restart service mysqld restart<br> Allow remote access<br> 1 .Add the following command line if necessary to add remote connection capabilities to root. The link password is 'your password'<br>   GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your password' WITH GRANT OPTION;<br>   FLUSH PRIVILEGES;

 2 .Open the my.cnf file<br>   Add a line bind-address=0.0.0.0<br>   3. Restart mysql

6. Install php<br>   Yum install php php-devel //php5.6 version <br> If you want to install 7.3<br> First install the EPEL source <br>

  1.yum install epel-release    //安装 EPEL 源
  2.yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm   //安装 REMI 源
  3.yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-xml

4.PHP installation directory/etc/opt/remi/php73/ php.ini is also in it<br> Find php Fix_pathinfo in .ini is changed to 0, but phpinfo() cannot be viewed; #8. Install composer

 

curl -sS https://getcomposer.org/installer | php73<br>  mv composer.phar /usr/local/bin/compose

r

  Enter composer like this An error will be reported:

/usr/bin/env: php: No such file or directory

<br> Solution <br>cd usr/bin cp php73 php<br> Just enter composer<br> Change the mirror to Alibaba Cloud:<br>composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/<br> 9. Install git<br>  

yum -y install git

10. Download laravel framework

 

composer create-project --prefer-dist laravel/laravel<br> Project name "6.*"<pre class='brush:php;toolbar:false;'>    systemctl restart php73-php-fpm #重启     systemctl start php73-php-fpm #启动     systemctl stop php73-php-fpm #关闭     systemctl status php73-php-fpm #检查状态</pre> Modify the composer file.

composer create-project --prefer-dist laravel/laravel laravelxs "6.*"
<br> Add "github.com": "Token generated on git"

11.nginx domain name configuration<br>

Create File: domain name.conf

<br> Contents: <br>

 cd /root/.config/composer/
  vi auth.json
  {
    "bitbucket-oauth": {},
    "github-oauth": {},
    "gitlab-oauth": {},
    "gitlab-token": {
      "github.com": "在git上生成的token"
    },
    "http-basic": {},
    "bearer": {}
  }

The above is the detailed content of How to install lnmp environment and composer of php7.3 in centos7.7. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:cnblogs. If there is any infringement, please contact admin@php.cn delete
AI and Composer: Enhancing Code Quality and DevelopmentAI and Composer: Enhancing Code Quality and DevelopmentMay 09, 2025 am 12:20 AM

In Composer, AI mainly improves development efficiency and code quality through dependency recommendation, dependency conflict resolution and code quality improvement. 1. AI can recommend appropriate dependency packages according to project needs. 2. AI provides intelligent solutions to deal with dependency conflicts. 3. AI reviews code and provides optimization suggestions to improve code quality. Through these functions, developers can focus more on the implementation of business logic.

What Defines a Composer: Understanding the RoleWhat Defines a Composer: Understanding the RoleMay 08, 2025 am 12:07 AM

Composers are people who express emotions, tell stories or express ideas by creating musical works, whose roles include conceiving musical structures, choosing instrument combinations, and working with other musicians. 1) Composers will go through four stages of conception, creation, modification and improvement during the creative process; 2) They need to master musical theories, such as harmony, counterpoint and melody, to ensure the quality and effect of the work.

Composer: Installing, Updating, and Managing DependenciesComposer: Installing, Updating, and Managing DependenciesMay 07, 2025 am 12:07 AM

Composer is a dependency management tool for PHP, and manages project dependencies through composer.json and composer.lock files. 1. Install Composer: Run a specific command and move composer.phar to the system path. 2. Update Composer: Use composelself-update command. 3. Dependency management: add dependencies through the composerrequire command, automatically update relevant files and download packages.

AI-Powered Composer: Code Generation and AnalysisAI-Powered Composer: Code Generation and AnalysisMay 06, 2025 am 12:11 AM

AI plays an important role in code generation and analysis: 1) generate code through machine learning and NLP, such as GitHub’s Copilot; 2) perform code analysis, identify bugs and optimization suggestions, such as SonarQube; 3) improve development efficiency and code quality, but requires manual review and optimization.

Composer: AI-Powered Tools and IntegrationsComposer: AI-Powered Tools and IntegrationsMay 05, 2025 am 12:11 AM

Composer itself does not include AI capabilities, but can be enhanced by AI tools. 1) AI can analyze composer.json files, and it is recommended to optimize dependencies and predict version conflicts. 2) AI-driven platforms such as GitHubCopilot can provide real-time code suggestions to improve development efficiency. When using AI tools, you need to verify and adjust them in combination with actual situations.

The Attributes of a Successful ComposerThe Attributes of a Successful ComposerMay 04, 2025 am 12:13 AM

The key traits of a successful composer include: 1) rich creativity and imagination, 2) solid mastery of technical skills and tools. These traits are similar to creative and structured thinking in programming, helping composers realize creativity and optimize their work in music creation.

The Requirements to Be a Composer: A Deep DiveThe Requirements to Be a Composer: A Deep DiveMay 03, 2025 am 12:08 AM

To become a composer, you need to master music theory, instrumental performance, be familiar with music style and history, and be creative and inspiring. Specific steps include: 1. Learn music theory, such as chord structure and rhythm mode; 2. Master the performance of musical instruments and improve creative inspiration; 3. Be familiar with music production software, such as AbletonLive, to improve creative efficiency; 4. Continuous practice and adjustment, create complex melodies and use discordant chords to increase music tension.

Composer: The Package Manager for PHP DevelopersComposer: The Package Manager for PHP DevelopersMay 02, 2025 am 12:23 AM

Composer is a dependency management tool for PHP, and manages project dependencies through composer.json file. 1) parse composer.json to obtain dependency information; 2) parse dependencies to form a dependency tree; 3) download and install dependencies from Packagist to the vendor directory; 4) generate composer.lock file to lock the dependency version to ensure team consistency and project maintainability.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)