yum install kernel-devel gccNext, download relevant RPM package to your CentOS version from
# rpm --import https://www.virtualbox.org/download/oracle_vbox.asc # rpm --checksig VirtualBox-5.0-5.0.0_101573_el7-1.x86_64.rpmIf signature match use below command to install VirtualBox package while replacing package version number with the one you have downloaded previously:
yum localinstall VirtualBox-5.0-5.0.0_101573_el7-1.x86_64.rpmRead more ...
raw_input()function is used to read a string from standard input such as keyboard. This way a programmer is able to include user inserted data into a program. Let's start with a simple example using python script to ask for an user name.
print "What is your name?" name = raw_input() print "Hello %s!" % nameFirst, we print string
What is your name?telling the user what we expect him to input. Next, using the
raw_input()function the standard input is assigned to a variable
name. Lastly, we print the value of variable
nameto standard output.
$ python input.py What is your name? Monty Python Hello Monty Python!Read more ...
# yum -y install http://linuxdownload.adobe.com/linux/x86_64/adobe-release-x86_64-1.0-1.noarch.rpmConfirm that Adobe repository has been included:
# yum repolist | grep -i adobe adobe-linux-x86_64 Adobe Systems Incorporated 2At this stage we are ready to install adobe flash player using
# yum install flash-pluginRead more ...
SyntaxError: Non-ASCII character '\xc4' in file test.py on line 1, but no encoding declared;
# - *- coding: utf- 8 - *-Read more ...
#!/bin/bash if [ -z "$1" ]; then echo "Empty Variable 1" fi if [ -n "$1" ]; then echo "Not Empty Variable 2" fi if [ ! "$1" ]; then echo "Empty Variable 3" fi if [ "$1" ]; then echo "Not Empty Variable 4" fi [[ -z "$1" ]] && echo "Empty Variable 5" || echo "Not empty Variable 5"Read more ...
grep. First, lets search for all files with a filename extension
$ find ~/ -type f | grep "\.sh$"Read more ...
UBUNTU/DEBIAN # apt-get install libgeo-ipfree-perlNext, create a script eg.
ip2location.plwith a following code:
#!/usr/bin/env perl use Geo::IPfree; my $geo = Geo::IPfree->new; my( $code, $country ) = $geo->LookUp( $ARGV ); print "Country: $country\n" . "Country Code: $code\n"Read more ...
# wget -q http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_8.0/Release.key # apt-key add - < Release.key # echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_8.0/ /' >> /etc/apt/sources.list.d/owncloud.list # apt-get updateNow install the
owncloudpackage which will also fetch all required prerequisites such as mysql-server or apache2 webserver:
# apt-get install owncloudIn the next step we are going to configure database. Let's enable database to start after reboot and start the database:
# systemctl enable mysql # service mysql startOnce the MySQL( mariaDB ) is up and running, we need to create a new database called
owncloud. All mysql commands below require administrator user name and password. Replace root user if your administration to access to mariaDB database is different:
# mysqladmin -u root -p create owncloud Enter password:Read more ...
owncloudand link local host system port 80 with container's exposed port 80.
# docker run -d --name=owncloud -p 80:80 linuxconfig/owncloudRead more ...
apache2ctlcommand with a combination of
-Myou can list all loaded apache modules on your system. For example the following command will list all loaded modules on separate lines:
# apache2ctl -M Loaded Modules: core_module (static) so_module (static) watchdog_module (static) http_module (static) log_config_module (static) logio_module (static) version_module (static) unixd_module (static) access_compat_module (shared) alias_module (shared) auth_basic_module (shared) authn_core_module (shared) authn_file_module (shared) authz_core_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) filter_module (shared) geoip_module (shared) mime_module (shared) mpm_event_module (shared) negotiation_module (shared) rewrite_module (shared) setenvif_module (shared) status_module (shared)Another alternative to the above command is:
# apache2ctl -t -D DUMP_MODULESRead more ...