Skip to content

Instantly share code, notes, and snippets.

@mumtazhqq
Last active January 21, 2021 12:28
Show Gist options
  • Save mumtazhqq/0cd443d3217f0f31bd4b60d4a1166463 to your computer and use it in GitHub Desktop.
Save mumtazhqq/0cd443d3217f0f31bd4b60d4a1166463 to your computer and use it in GitHub Desktop.
Step by step to Setup latest laravel on codeanywhere from centos stack

Installing the latest laravel on codeanywhere

CodeAnywhere is a great cloud IDE to create web apps but it lacks that latest install of Laravel. So I used blank centos6.5 stack as my base and then following this step to setup laravel environtment.

first update the yum package by running

sudo yum update

installing remi's Repository

sudo yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

After that, we’ll install the basic packages required to run a fresh Laravel installation

Basic setup – Git, Apache, MySQL, PHP & Extensions

sudo yum --enablerepo=remi,remi-php71 install git httpd php php-common mysql mysql-server php-pecl-zip php-mysql php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

Installing Composer

wget https://getcomposer.org/composer.phar
chmod +x composer.phar
mv composer.phar /usr/bin/composer

Edit the httpd.conf under /etc/httpd/conf/ to adjust the resource use settings.

sudo vim /etc/httpd/conf/httpd.conf

using vim edit the root directory to "/home/cabox/workspace"

start apache for the first time and set it to run at boot

sudo service httpd start11
sudo /sbin/chkconfig --levels 235 httpd on

start mysql for the first time and set it to run at boot

sudo service mysqld start
sudo /sbin/chkconfig --levels 235 mysqld on

dont forget to run mysql secure installation

mysql_secure_installation

instal node and npm

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum -y install nodejs
sudo yum install gcc-c++ make

cek node and npm installation by running this command

node -v
npm -v

Install laravel globally

composer global require "laravel/installer"

setup laravel $PATH

place composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system

echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
source ~/.bashrc

check laravel installation

laravel

done happy codeanywhere.ing

laravel new app```

@Stroomschok
Copy link

-> composer global require "laravel/installer"

Fails because of:

  • laravel/installer v2.0.0 requires guzzlehttp/guzzle ~6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0].
    • laravel/installer v2.0.1 requires guzzlehttp/guzzle ~6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0].
    • guzzlehttp/guzzle 6.3.0 requires php >=5.5 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.2.3 requires php >=5.5 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.2.2 requires php >=5.5 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.2.1 requires php >=5.5 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.2.0 requires php >=5.5.0 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.1.1 requires php >=5.5.0 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.1.0 requires php >=5.5.0 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.0.2 requires php >=5.5.0 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.0.1 requires php >=5.5.0 -> your PHP version (5.3.3) does not satisfy that requirement.
    • guzzlehttp/guzzle 6.0.0 requires php >=5.5.0 -> your PHP version (5.3.3) does not satisfy that requirement.
    • Installation request for laravel/installer ^2.0 -> satisfiable by laravel/installer[v2.0.0, v2.0.1].

@kalyankumars07
Copy link

Hi,

I have installed the laravel successfully. But when I accessing in the browser I can only the files and directories list instead of a welcome page.

@a4027971
Copy link

a4027971 commented May 2, 2018

@Stroomschok
This problem is due to the version of php is too old.
[Solution]
This command needs add sudo
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
and then install php again
sudo yum --enablerepo=remi,remi-php71 install git httpd php php-common mysql mysql-server php-pecl-zip php-mysql php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

@a4027971
Copy link

a4027971 commented May 2, 2018

@kalyankumars07
I solve my problem by setting my apache Document root setting to DocumentRoot /home/cabox/workspace/{myapp}/public
and then change the permission of the directory
chmod 777 /workspace/{myapp} -R

may this help you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment