Working with certificates

Create a self-signed SSL Certificate with OpenSSL

openssl genrsa -out key.pem 2048
openssl req -new -key key.pem -out csr.pem
openssl req -x509 -days 365 -key key.pem -in csr.pem -out certificate.pem

https://startssl.com/

Tags : TLS SSL
Created 07/03-2016 by Michael Bornholdt Nielsen
How to Install PHP 7

How to Install PHP 7 with Apache and MariaDB on CentOS 7/Debian 8

how to compile php7 on fedora 23 with fpm enabled

[mni@localhost ~] sudo dnf install gcc libxml2-devel pkgconfig openssl-devel 
[mni@localhost ~] sudo dnf install bzip2-devel libpng-devel libpng-devel 
[mni@localhost ~] sudo dnf install libjpeg-devel libXpm-devel freetype-devel 
[mni@localhost ~] sudo dnf install gmp-devel libmcrypt-devel mariadb-devel
[mni@localhost ~] sudo dnf install aspell-devel recode-devel httpd-devel
[mni@localhost ~] sudo dnf install bison
[mni@localhost ~] sudo dnf install re2c
[mni@localhost ~] sudo dnf install autoconf
[mni@localhost ~] sudo dnf install libcurl-devel
[mni@localhost ~] sudo mkdir /opt/php7
[mni@localhost ~] sudo wget http://se2.php.net/distributions/php-7.0.3.tar.gz
[mni@localhost ~] sudo tar xzf php-7.0.3.tar.gz -C /opt/php7
[mni@localhost ~] sudo cd /opt/php7/php-7.0.3
[mni@localhost ~] sudo ./buildconf --force
[mni@localhost ~]  ./configure 
--prefix=/opt/php7/usr 
--with-config-file-path=/opt/php7/usr/etc 
--enable-mbstring 
--enable-zip 
--enable-bcmath 
--enable-pcntl 
--enable-ftp 
--enable-exif 
--enable-calendar 
--enable-sysvmsg 
--enable-sysvsem 
--enable-sysvshm 
--enable-wddx 
--with-curl 
--with-mcrypt 
--with-iconv 
--with-gmp 
--with-pspell  
--with-gd 
--with-jpeg-dir=/usr 
--with-png-dir=/usr 
--with-zlib-dir=/usr 
--with-xpm-dir=/usr 
--with-freetype-dir=/usr  
--enable-gd-native-ttf  
--enable-gd-jis-conv 
--with-openssl 
--with-pdo-mysql=/usr  
--with-gettext=/usr 
--with-zlib=/usr 
--with-bz2=/usr 
--with-recode=/usr 
--with-mysqli=/usr/bin/mysql_config  
--with-apxs2
[mni@localhost ~] sudo make
[mni@localhost ~] sudo make install
[mni@localhost ~] sudo cp /opt/php7/php-7.0.3/php.ini-development /opt/php7/usr/etc/php.ini

Tags : PHP
Created 22/02-2016 by Michael Bornholdt Nielsen
Updated 07/03-2016 by Michael Bornholdt Nielsen
Change to static ip on CentOs and Fedora
Tags : Linux
Created 02/03-2016 by Michael Bornholdt Nielsen
HowTo setup Firewalld
Tags : Linux
Created 02/03-2016 by Michael Bornholdt Nielsen
Server gui on Linux

yum groups install "Server with GUI"

eller

Svarende til
init 3:  multi-user.target

Opret et link:
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target


Svarende til
init 5: graphical.target

Opret et link:
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

Tags : Linux
Created 26/02-2016 by Michael Bornholdt Nielsen
Scratch Spil
Tags : Scratch
Created 18/01-2016 by Michael Bornholdt Nielsen
Updated 02/02-2016 by Michael Bornholdt Nielsen
Bash File Testing

-b filename - Block special file
-c filename - Special character file
-d directoryname - Check for directory existence
-e filename - Check for file existence, regardless of type (node, directory, socket, etc.)
-f filename - Check for regular file existence not a directory
-G filename - Check if file exists and is owned by effective group ID.
-g filename - true if file exists and is set-group-id.
-k filename - Sticky bit
-L filename - Symbolic link
-O filename - True if file exists and is owned by the effective user id.
-r filename - Check if file is a readable
-S filename - Check if file is socket
-s filename - Check if file is nonzero size
-u filename - Check if file set-user-id bit is set
-w filename - Check if file is writable
-x filename - Check if file is executable

Source:
http://stackoverflow.com/questions/638975/how-do-i-tell-if-a-regular-file-does-not-exist-in-bash#21164441

Tags : Bash
Created 01/12-2015 by Michael Bornholdt Nielsen
first page - previous page - next page
About
This site is used as a place to dump my ideas, links and other stuff I normaly forget.

Made by Michael Bornholdt Nielsen => Jarry.dk