Linux: Difference between revisions
Line 16: | Line 16: | ||
=== Contairner Docker === | === Contairner Docker === | ||
* Web site [https://www.docker.com Docker] | * Web site [https://www.docker.com Docker] | ||
* Install | * Install | ||
<pre> apt-get install docker.io</pre> | <pre> apt-get install docker.io</pre> | ||
* Install and run a container | * Install and run a container | ||
<pre>docker run -i -t ubuntu:14:04 /bin/bash</pre> | <pre>docker run -i -t ubuntu:14:04 /bin/bash</pre> | ||
* Commit (Create an image from a container) "b5673dbced61" is an image id | |||
<pre>docker commit -m "Ubuntu 14.10 Dmonstrator" -a "Author Name" b5673dbced61 demo:14.10<pre> | |||
* List Images (Source to initiare a containers) | |||
<pre>docker images</pre> | |||
* Remove an image "b5673dbced61" is an image id | |||
<pre>docker rmi b5673dbced61 </pre> | |||
* List containers (Running Virtual Machines) | |||
<pre> docker ps</pre> | |||
* Remove a container "d0955f21bf24" is a container Id | |||
<pre>docker rm d0955f21bf24 | |||
=== Owncloud === | === Owncloud === |
Revision as of 19:22, 27 March 2015
Command Line
Vi
Configuration
Php
VirtualBox
- Increase Virtual Disk space
- VBoxManage modifyhd <absolute path to file> --resize <size in MB>
VBoxManage modifyhd wim.vdi --resize 20000
Contairner Docker
- Web site Docker
- Install
apt-get install docker.io
- Install and run a container
docker run -i -t ubuntu:14:04 /bin/bash
- Commit (Create an image from a container) "b5673dbced61" is an image id
docker commit -m "Ubuntu 14.10 Dmonstrator" -a "Author Name" b5673dbced61 demo:14.10<pre> * List Images (Source to initiare a containers) <pre>docker images
- Remove an image "b5673dbced61" is an image id
docker rmi b5673dbced61
- List containers (Running Virtual Machines)
docker ps
- Remove a container "d0955f21bf24" is a container Id
docker rm d0955f21bf24 === Owncloud === * Add the repository <syntaxhighlight lang="bash"> sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud.list" </syntaxhighlight> * Add Key <syntaxhighlight lang="bash"> wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key sudo apt-key add - < Release.key </syntaxhighlight> * Install <syntaxhighlight lang="bash"> sudo apt-get update sudo apt-get install owncloud </syntaxhighlight> === Apache Svn Server=== 1: Install Apache HTTP server and required modules: <syntaxhighlight lang="bash">sudo apt-get install libapache2-svn apache2</syntaxhighlight> 2: Enable SSL <syntaxhighlight lang="bash"> sudo a2enmod ssl sudo vi /etc/apache2/ports.conf </syntaxhighlight> Add or check that the following is in the file: <pre> <IfModule mod_ssl.c> Listen 443 </IfModule>
3: Generate an SSL certificate:
sudo apt-get install ssl-cert
sudo mkdir /etc/apache2/ssl
sudo /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
4: Create virtual host
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/svnserver
sudo kate /etc/apache2/sites-available/svnserver
Change (in ports.conf):
"NameVirtualHost *" to "NameVirtualHost *:443"
and (in svnserver)
<VirtualHost *> to <VirtualHost *:443>
Add, under ServerAdmin (also in file svnserver):
SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.pem SSLProtocol all SSLCipherSuite HIGH:MEDIUM
5: Enable the site:
sudo a2ensite svnserver
sudo /etc/init.d/apache2 restart
To overcome warnings:
sudo vi /etc/apache2/apache2.conf
Add: "ServerName $your_server_name"
Add, under ServerAdmin (also in file svnserver):
SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.pem SSLProtocol all SSLCipherSuite HIGH:MEDIUM
6: Adding repository(ies): The following setup assumes we want to host multiple repositories. Run this for creating the first repository:
sudo mkdir /var/svn
sudo svnadmin create /var/svn/mysvnrepository
sudo chown -R www-data:www-data /var/svn/mysvnrepository
sudo chmod -R g+ws /var/svn/mysvnrepository<
6.a. For more repositories: do step 6 again (changing mysvnrepository Name)
7: Add an authenticated user
sudo htpasswd -c -m /etc/apache2/dav_svn.passwd $user_name
8: Enable and configure WebDAV and SVN:
sudo vi /etc/apache2/mods-available/dav_svn.conf
Add or uncomment:
<Location /svn> DAV svn # for multiple repositories - see comments in file SVNParentPath /var/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user SSLRequireSSL </Location>
9: Restart apache server:
sudo /etc/init.d/apache2 restart
10: Validation:
Fired up a browser:
http://localhost/svn/$REPOS https://localhost/svn/$REPOS
Commit something:
svn import --username $user_name anyfile.txt https://localhost/svn/$REPOS/anyfile.txt -m “Testing”
Accept the certificate and enter password. Check out what you've just committed:
svn co --username $user_name https://localhost/svn/$REPOS
Server Setup
Open DKIM
Web site [1] For each domain:
- Create folder
mkdir /etc/opendkim/keys/domain_name
- Update configuration file /etc/opendkim/KeyTable
- Generate Key
opendkim-genkey -s mail -d domain_name
- Change Owner
chown opendkim: /etc/opendkim/KeyTable/domaine_name/mail.private
- Copy the key (mail.txt) into the dns record.