Lxc: diferència entre les revisions
Salta a la navegació
Salta a la cerca
Línia 30: | Línia 30: | ||
lxc-start -n <container_name> | lxc-start -n <container_name> | ||
lxc-attach -n <container_name> | lxc-attach -n <container_name> | ||
====LAMP installation==== | |||
yum install httpd | |||
systemctl enable httpd | |||
sudo yum install mysql-server | |||
sudo service mysqld start | |||
sudo /usr/bin/mysql_secure_installation | |||
sudo yum install php php-mysql | |||
yum search php- | |||
yum info name of the module | |||
yum install php-fpm | |||
sudo chkconfig httpd on | |||
sudo chkconfig mysqld on | |||
more info: | |||
* https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6 | |||
* https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-7 | |||
===Other info=== | ===Other info=== |
Revisió del 16:13, 25 feb 2016
CentOS
Add EPEL repository
http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
## RHEL/CentOS 7 64-Bit ## wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm rpm -ivh epel-release-7-5.noarch.rpm
Install LXC
yum install lxc lxc-templates
Other install
yum install bridge-utils
yum install -y libvirt systemctl start libvirtd brctl show
bridge name bridge id STP enabled interfaces virbr0 8000.fea2866efadb yes veth7ATCJK
Image creation
lxc-create -n centos1 -t centos lxc-start -n centos1
Login to Container: The root password is set in the lxc template.
lxc-start -n <container_name> lxc-attach -n <container_name>
LAMP installation
yum install httpd systemctl enable httpd
sudo yum install mysql-server sudo service mysqld start sudo /usr/bin/mysql_secure_installation
sudo yum install php php-mysql yum search php- yum info name of the module yum install php-fpm
sudo chkconfig httpd on sudo chkconfig mysqld on
more info:
- https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
- https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-7
Other info
Migrate/convert existing full CentOS 6 server to LXC container: http://blog.a2o.si/2015/10/11/migrate-convert-existing-full-centos-6-server-to-lxc-container/
Linux, Apache, MySQL, PHP in an LXC Container: https://zyisrad.com/linux-apache-mysql-php-in-an-lxc-container/
Pacman roseta https://wiki.archlinux.org/index.php/Pacman/Rosetta