+ 2
How to run php in linux ubuntu?
i use any text editor like gedit or vim but i don't how to setup a local webserver for practice. thanx in advance.
6 ответов
+ 1
Try to use php built-in web server:
cd /html/folder/
php -S localhost:80
if you want to use Apache2 or nginx follow one of the many guides "how to create a LAMP (or LEMP) server".
+ 1
lampp 😐
+ 1
install apache
apt-get install apache
apt-get install php
+ 1
Use xampp.
it's free, and easy to install in Ubuntu.
after installation, type this command in terminal:
sudo /opt/lampp/lampp start
now you can start appache and MySQL using GUI.
you have to save your PHP files inside:
/opt/lampp/htdocs
then open your browser and enter this address:
http://localhost/your_file.php
enjoy it!
0
install XAMPP (i dont know if it runs on linux, but search it on Google)
0
apt-get update
apt-get upgrade
apt-get install curl
curl --silent --location https://deb.nodesource.com/setup_0.12 | bash -
apt-get install --yes nodejs
apt-get install --yes build-essential
apt-get install sudo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
apt-get install mongodb
sudo apt-get install -y mongodb-org
sudo touch /etc/init.d/mongodb
sudo chmod 755 /etc/init.d/mongodb
apt-get install apache2
apt-get install php5 php-pear php5-mysql
service apache2 restart
Use this commands in ubuntu