first update os
sudo apt-get update
and install mysql
sudo apt-get install mysql-server
CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci;
سیستم عامل برای پردازنده های ARM
برای شروع میتوان از سند زیر کمک گرفت:
https://docs.armbian.com/User-Guide_Getting-Started
برای دانلود به این صفحه رفته و Armbian Stretch را دانلود کنید:
https://www.armbian.com/tinkerboard
https://dl.armbian.com/tinkerboard/Debian_stretch_next.7z
نام کاربری و کلمه عبور پیش فرض
username: root
password: 1234
برای اتصال به شبکه وایرلس میتوان از دستور زیر استفاده کرد:
nmtui-connect
برای مانیتور کردن دما و پردازنده میتوان از دستور زیر استفاده کرد:
armbianmonitor -m
قبل از هر کاری ابتدا باید مخزن برنامه ها را بروز کرد تا بتوان بسته ها را نصب کنیم
برای این کار از دستورهای زیر استفاده میکنیم
apt update
apt upgrate
سپس میتوان بسته های زیر ر ا نصب کرد
apt install mysql-server
apt install openjdk-8-jdk
برای ساخت پایگاه داده میتوان از دستور زیر استفاده کرد
CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci
;
/etc/rc.local
TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true;SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy).build();SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();requestFactory.setHttpClient(httpClient);RestTemplate restTemplate = new RestTemplate(requestFactory);HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);MultiValueMap<String, String> map = new LinkedMultiValueMap<>();map.add("param1", param1);map.add("param2", param2);map.add("param3", param3);HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(map, headers);ResponseEntity<String> response = restTemplate.postForEntity("https://url", request, String.class);//
/etc/ssh/sshd_config
ClientAliveInterval 120ip link show
nano/etc/network/interfaces
auto enp0s3
iface enp0s3 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
https://www.ocf.berkeley.edu/~xuanluo/sshproxywin.html
Supported keywords inside method names
Keyword | Sample | JPQL snippet |
---|---|---|
And | findByLastnameAndFirstname | … where x.lastname = ?1 and x.firstname =
?2 |
Or | findByLastnameOrFirstname | … where x.lastname = ?1 or x.firstname =
?2 |
Between | findByStartDateBetween | … where x.startDate between 1? and
?2 |
LessThan | findByAgeLessThan | … where x.age < ?1 |
GreaterThan | findByAgeGreaterThan | … where x.age > ?1 |
After | findByStartDateAfter | … where x.startDate > ?1 |
Before | findByStartDateBefore | … where x.startDate < ?1 |
IsNull | findByAgeIsNull | … where x.age is null |
IsNotNull,NotNull | findByAge(Is)NotNull | … where x.age not null |
Like | findByFirstnameLike | … where x.firstname like ?1 |
NotLike | findByFirstnameNotLike | … where x.firstname not like ?1 |
StartingWith | findByFirstnameStartingWith | … where x.firstname like ?1 (parameter
bound with appended % ) |
EndingWith | findByFirstnameEndingWith | … where x.firstname like ?1 (parameter
bound with prepended % ) |
Containing | findByFirstnameContaining | … where x.firstname like ?1 (parameter
bound wrapped in % ) |
OrderBy | findByAgeOrderByLastnameDesc | … where x.age = ?1 order by x.lastname
desc |
Not | findByLastnameNot | … where x.lastname <> ?1 |
In | findByAgeIn(Collection<Age>
ages) | … where x.age in ?1 |
NotIn | findByAgeNotIn(Collection<Age>
age) | … where x.age not in ?1 |
True | findByActiveTrue() | … where x.active = true |
False | findByActiveFalse() | … where x.active = false |
http://docs.spring.io/spring-data/jpa/docs/1.4.1.RELEASE/reference/html/jpa.repositories.html
در پوشه config در فایل server.xml به ازای هر یک از app ها یکی از این ها رو قرار دهید تا هر دامنه ای به پوشه مورد نظر ارتباط داده شود.
<Host name="<<domain.ir>>" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Alias><<www.domain.ir>></Alias>
<Context path="" docBase="<<your_folder_name>>" debug="0" privileged="true" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="<<appName>>_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" resolveHosts="false"
/>
</Host>
خطهای آبی رو پاک کنید و تنظیمات خودتون رو قرار بدید
برای راه اندازی یک DNS Server بر روی CentOS مراحل زیر را انجام میدهیم
yum install bind* -y
rndc-confgen
########################################
edit: /etc/named
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
################################
edit /etc/named*.zones
zone "domain1.ir" IN {
type master;
file "/var/named/zones/db.domain1.ir.txt";
allow-transfer { none; };
};
zone "domain1.com" IN {
type master;
file "/var/named/zones/db.domain1.com.txt";
allow-transfer { none; };
};
######################
create file in: /var/named/zones/db.domain1.com.txt
$TTL 6h
@ IN SOA ns1.domain1.com. ns2.domain1.com. (
2015081101
10800
3600
604800
86400 )
@ NS ns1.domain1.com.
ns1 IN A 12.92.144.103
www IN A 12.92.144.103
@ IN A 12.92.144.103
فقط کافیه که از github دانلودش کنید، بعد از اینکه دانلود کردید برید تو پوشه اش بعد این رو بزنید.
npm link
بعد از این میتونید به راهتی با استفاده از دستور زیر ازش استفاده کنید
yo [name]