NOTE: on google-cloud, dont forget to set firewall rules!
sudo yum —assumeyes update;
sudo yum —assumeyes install httpd;
sudo systemctl start httpd ;
sudo systemctl enable httpd ;
sudo systemctl status httpd ;
vi /etc/httpd/conf/httpd.conf ;
Find the section and change AllowOverride None to AllowOverride All
AllowOverride All
and add this line:
LoadModule rewrite_module modules/mod_rewrite.so
and finally:
sudo systemctl restart httpd ;
P H P — A P A C H E S T U F F :
yum —assumeyes install php-pdo ;
yum —assumeyes install php-pdo_mysql ;
service httpd restart ;
- had to do the following on 123systems.net:
yum —assumeyes install firewalld ;
systemctl unmask firewalld ;
systemctl enable firewalld ;
systemctl start firewalld ;
firewall-cmd —permanent —add-port=80/tcp ;
firewall-cmd —get-active-zones ;
firewall-cmd —zone=dmz —add-port=80/tcp —permanent ;
firewall-cmd —get-active-zones ;
firewall-cmd —reload ; ### do NOT forget this step !
- OPTIONAL OPTIONAL – otherwise you can see the “default” apache page
cat </var/www/html/index.html ;
this is a test to see if apache is indeed working
END
now try the IP ## in your browser.
cat </var/www/html/phpinfo.php;
END
- INSTALL PHP:
yum —assumeyes install php php-pear php-mysql ; ## current default centos version, might be old
systemctl restart httpd.service ; ## dont skip this step (again)!
mariadb 10.2 BETA written from here
INITIAL:
sudo yum —assumeyes update ;
sudo yum —assumeyes group install “Development Tools” ;
sudo yum —assumeyes install git wget curl ;
###########sudo yum —assumeyes install gcc gcc-c++ ;
NODE:
sudo -i ;
curl —silent —location https://rpm.nodesource.com/setup_7.x | bash – ;
yum —assumeyes install nodejs ;
which node ;
node —version ;
APACHE:
sudo yum —assumeyes install httpd ;
sudo systemctl start httpd.service ;
sudo systemctl enable httpd.service ;
MARIADB:
cat </etc/yum.repos.d/MariaDB.repo ;
- MariaDB 10.2 CentOS repository list – created 2016-12-12 17:34 UTC
- http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
END
yum —assumeyes install MariaDB-server MariaDB-client ;
mysql_install_db —user=mysql —basedir=/usr —datadir=/var/lib/mysql ;
systemctl start mariadb ;
systemctl enable mariadb ; ## optional !
mysql ; ## notice version number !
CREATE USER ‘john’@‘localhost’ IDENTIFIED BY ‘123’ ;
GRANT ALL ON . to ‘john’@‘localhost’
IDENTIFIED BY ‘123’ with max_queries_per_hour 0
MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0
MAX_USER_CONNECTIONS 0;
CREATE DATABASE IF NOT EXISTS deepstream ;
GRANT ALL PRIVILEGES ON `deepstream`.* TO ‘john’@‘localhost’ ;
EXIT
mysql —user=john -p123 deepstream ;
DEEPSTREAM:
sudo wget https://bintray.com/deepstreamio/rpm/rpm -O /etc/yum.repos.d/bintray-deepstreamio-rpm.repo ;
sudo yum install —assumeyes deepstream.io ;
which deepstream;
deepstream —version ;
DEEPSTREAM-MARIADB CONNECTOR:
MANUALLY INSTALL plugin at /etc/deepstream/config.yml !
plugins:
storage:
name: deepstream.io-storage-mariadb
options:
ds_host: ‘localhost’
ds_user: ‘john’
ds_password: ‘123’
ds_databaseName: ‘deepstream’
ds_tableName: ‘deepstream_storage’
ds_keyType: ‘text’
ds_valueType: ‘text’
ds_splitter: ‘/’
(log out of root!)
mkdir server; cd server;
npm init;
npm install —save uws ; ## not sure if this is needed??
npm install —save deepstream.io ;
npm install —save deepstream.io-client-js ;
npm install —save perimetral/deepstream.io-storage-mariadb ; ## may be replaced
npm install —save dyncol ; ## only for blob/binary usage
npm install —save sequelize ; ## only for blob/binary usage
server.js:
cat <server.js ;
let ds = require(‘deepstream.io’);
let connector = require(‘deepstream.io-storage-mariadb’);
//let server = new Deepstream(); ### BAD – typo in instructions !
let server = new ds();
server.set(‘storage’, new connector({
mariasql: {
host: ’127.0.0.1’,
user: ‘john’,
password: ‘123’,
db: ‘deepstream’,
},
table: {
name: ‘deepstream_storage’,
keyType: ‘text’,
valueType: ‘text’,
},
splitter: ‘/’,
}));
server.start() ;
END
node server.js ;
===================
example.js
mkdir ~/example; cd ~/example ;
npm init; ## answer questions
npm install —save deepstream.io-client-js ;
cat < example.js ;
const deepstream = require(‘deepstream.io-client-js’) ;
const util = require(‘util’) ;
const dsIpPort = ‘localhost:6020’ ;
const client = deepstream(dsIpPort).login() ;
var record = client.record.getRecord(‘Another-New-Record-Name’);
var testJson =
{ ‘newTestJson’ :
[
{ ‘firstKey’ : ‘this is my first key’
, ‘secondKey’ : ‘this is my second key’
}
,
{ ‘thirdKey’ : ‘this is my third key’
, ‘fourthKey’ : ‘this is my fourth key’
}
]
}
;
console.log(util.inspect(testJson));
record.whenReady( () => { // ? ? ? ? ? ?
record.set(‘myTestJsonValue’, {x:2} );
//record.set(‘firstname’, ‘this is a test value’ );
//record.set(‘myTestJsonValue’, testJson );
});
END
node example.js ;
#######deepstream install storage mariadb ;
- ln -s
- /var/lib/deepstream/deepstream.io-storage-mariadb/src/connector.js
- /var/lib/deepstream/deepstream.io-storage-deepstream.io-storage-mariadb ;
https://www.npmjs.com/package/deepstream.io-storage-mariadb
===
##git clone https://github.com/perimetral/deepstream.io-storage-mariadb
- ?? ln -s /root/node_modules/deepstream.io-storage-cockroachdb/src/connector.js
When is Donald Trump going to stop embarrassing his friends, let
alone the whole country?
source
Donald Trump’s surprise and unprovoked attack on Megyn Kelly during her show last night is as unacceptable as it is disturbing. Megyn Kelly represents the very best of American journalism and all of us at FOX News Channel reject the crude and irresponsible attempts to suggest otherwise. I could not be more proud of Megyn for her professionalism and class in the face of all of Mr. Trump’s verbal assaults. Her questioning of Mr. Trump at the debate was tough but fair, and I fully support her as she continues to ask the probing and challenging questions that all presidential candidates may find difficult to answer. Donald Trump rarely apologizes, although in this case, he should. We have never been deterred by politicians or anyone else attacking us for doing our job, much less allowed ourselves to be bullied by anyone and we’re certainly not going to start now. All of our journalists will continue to report in the fair and balanced way that has made FOX News Channel the number one news network in the industry.
to install express from scratch:
open port:
- Go to cloud.google.com
- Go to my Console
- Choose you Project.
- Choose “Compute Engine”
- Choose “Networks”
- Choose the interface for you Instances.
- In firewalls section, Go to Create New.
- Create your rule, in this case “Protocols & Ports” would be “tcp:9090” i guess.
- Save.
sudo yum —assumeyes group install “Development Tools” ;
curl o https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash ;
nvm install node ;
#############sudo yum —assumeyes install httpd mod_ssl ;
#############sudo /usr/sbin/apachectl start ;