IMPROVBOY Online & Print Marketing
“Where inspiration and science create brilliant solutions.”
How To Install Magento 2 on Centos Server
How To Install Magento 2 on Centos Server
Let’s face it, installing Magento 2 is not for the faint of heart. If you are planning to install Magento 2 on a Linux Centos server, you can assume that it will take a few hours.
- Go to Magento.com and review the Magento 2 requirements and prerequisites.
Compare your server to the requirements and prerequisites that are needed before installation. I found that Magento 1 did not need nearly as many resources and prerequisites as Magento 2. I needed to upgrade PHP to version 5.6 using Easy Apache on the server. While upgrading PHP in Easy Apache, I also enabled the additional PHP extensions as listed on magento.com and rebuilt Apache. The only thing that I did differently from the Magento prerequisites was instead of enabling curl, I enabled curlSSL. CurlSSL is an extension that enables curl to be used both over http and https. CurlSSL is needed for at least the UPS api to retrieve the rates.
In addition to enabling the additional PHP extensions, you need to verify that OpCache is turned on in the php.ini file, and the following line is present and uncommented in the php.ini file:
extension = php_intl.dll
- Prepare the place where you are going to install Magento 2.
For example, you may want to develop Magento 2 in a sub-folder off the main domain: www.domain.com/magento2/ where domain.com is what is your domain name.
Create the sub-folder on the server, and give it ownership for all files and folders that will reside in it. If you don’t do this at this step, you will eventually need to do it after you upload the Magento folders and files, because not all of them will automatically have the correct ownership, and you will need to do the following command in the command line:
chown –hR ownername magento2/
- Create a new database on the same server.
- Download the zipped Magento 2.x with or without sample data from magento.com.
- Upload the zipped Magento 2.x to the new sub-folder magento2/ and Extract it.
- Change bin/magento permissions to be 0755
- At this point, theoretically, you should be able to go to domain.com/magento2/setup and go through an installation wizard. As of January 2017, it won’t work. You need to install with the command line in the bin/ folder.
./magento setup:install --base-url=http://www.domain.com/magento2/ \ --admin-firstname='Jane' \ --admin-lastname='Doe' \ --firstname.lastname@example.org' \ --admin-user='user' \ --admin-password='password123' \ --base-url=http://www.domain.com/magento2/ \ --db-host=localhost --db-name=magento \ --db-user=magento --db-password=magento \ --language=en_US \ --currency=USD --timezone=America/Chicago \ --use-rewrites=1 --use-secure=1 –base-url-secure=https://www.domain.com/magento2/ \ --use-secure-admin=1 --admin-use-security-key=1 --session-save=files\
The following website explains the different options and values : http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html
The admin password must be at least 7 characters and include both numeric and alphabetic characters.
- Remove write permissions for magento2/app/etc/
- Check backend with new magento admin uri to make sure everything is working.
If you see permissions errors, chances are it is an ownership problem. In your FTP program, you can see that some of the folders may have you as the owner and others have 0. Even on the surface, the main folder may have the correct ownership, but if you look at the sub-folders, you may see 0.
To set the ownership, refer back to #2 in this list.
If you see the error Exception Printing is Disabled…, the ownership is probably wrong for the var/generation folder and/or sub-folders.
To find out for sure:
a. Navigate to magento2/pub/errors/
b. Change local.xml.sample to local.xml
c. You should now see the new list of errors on the Magento page to see where the problem resides.
- If you are having problems logging into the backend and your account is disabled, you need add the following to the command line where the magento2/ folder resides to unlock the login: (apparently this is a common problem)
php bin/magento admin:user:unlock username
Where username is your username you use to log into the backend.
php bin/magento cache:flush
- How To Install Magento 2 on Centos Server
- No PO Box for Shipping in Checkout
- Add Social Media Share Buttons to Magento WordPress Integration Pages
- Magento 1.9 New Registration Error: Please Make Sure Your Passwords Match
- Why is My ionCube Loader Not Working?
- Find the PHP Version on Your Server & Website
HTML & CSS Articles
Beaver Builder Theme Articles
Divi Theme Articles
Graphic Art Articles
Head Programmer and Graphic Artist
[et_social_follow icon_style="slide" icon_shape="rounded" icons_location="left" col_number="auto" outer_color="dark"]