In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to install lamp service using Cloud Virtual Machine? I believe that many inexperienced people are helpless about this. For this reason, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Cloud Virtual Machine The hardware for installing lamp environment is Cloud Virtual Machine, and the provided system Linux CentOs7.3 is installed. LAMP environment setup, and then install Laravel5.2 framework. LAMP installation is sequential: Apache or Mysql is installed first, PHP is installed last.
1. install Apache
yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql
Set boot boot up apache
systemctl enable httpd.service
start Apache
systemctl start httpd.service
Apache installation successful, virtual host and so on the following configuration.
2. install MySQL
Remove the previous version before installation to avoid unsuccessful installation.
View rpm package for mysql
rpm -qa | gerp mysql
Delete it when you find it.
yum remove filename (multiple names at once, separated by spaces)
After MySQL configuration is successfully installed, configure the remote connection database.
3. Install PHP
Remove previous php versions
First check rpm -qa| grep php
Remove yum remove file name
Configure the yum source and confirm in advance that the link to the yum source is valid.
yum install epel-releaserpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Confirm php version installed
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
Install PHP 5.6
yum install --enablerepo =remi --enablerepo= rem-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhpf php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-commonphp-opcache and php-pecl-apcu will effectively speed up php execution.
Confirm php version php -v installed successfully
4. Install Composer, it is faster to use domestic mirror.
install composer
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"php composer-setup.phpphp -r "unlink('composer-setup.php');"
configure global
sudo mv composer.phar /usr/local/bin/composer
5. Install laravel version 5.2
composer create-project laravel/laravel --prefer-dist laravel5.2(project name) 5.2.*
Do not run Composer as root/super user! See https://getcomposer.org/root for details, This is because the composer In order to prevent illegal scripts from executing under root, The solution is to switch to a non-root user.
Download laravel5.2/public/.htaccess to windows with ftp tool, open it with text editing tool, modify laravel5.2/public/.htaccess file, remove #sign in front of RewriteEngine On, some servers need to add a line RewriteBase /at the end
Apache and Laravel 5.2
Restart Apache.
systemctl restart httpd.service
After reading the above, do you know how to install lamp service using Cloud Virtual Machine? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.